local function MyDialogSwitch(id,text)
  return{
    LinearLayout;
    layout_width="fill";
    background=Ripple(nil,普通波纹,"square");
    onClick=function(view)
      local viewChild=view.getChildAt(0)
      viewChild.Checked=not(viewChild.Checked)
    end;
    {
      Switch;
      layout_width="fill";
      id=id;
      text=text;
      textSize="16sp";
      layout_marginLeft="24dp";
      layout_marginRight="24dp";
      layout_marginTop="16dp";
      layout_marginBottom="16dp";
      Clickable=false;
    };
  };
end
return MyDialogSwitch